<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div th:object="${teacher}">
        姓名：<span th:text="*{name}"></span><br/>
        年龄：<span th:text="*{age}"></span><br/>
    </div>

</body>
</html>